home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4540 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: nntphost.dur.ac.uk!nntp
  2. From: "Fred H.-M. Chen" <H.M.Chen@durham.ac.uk>
  3. Newsgroups: comp.lang.c++
  4. Subject: fstream problem
  5. Date: Tue, 30 Jan 1996 20:35:33 +0000
  6. Organization: University of Durham, Durham, UK
  7. Message-ID: <310E8115.41C67EA6@durham.ac.uk>
  8. NNTP-Posting-Host: tann-4.dur.ac.uk
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0b5 (X11; I; SunOS 4.1.3_U1 sun4m)
  13.  
  14. Dear C++ Users,
  15.  
  16.   These days I tried to use file io stream. I wrote my own class for
  17. some simple manupulations. I am using g++ with gcc version 2.7.2 and
  18. newest version g++lib. During compiling, everything is O.K., it caused
  19. segmentation fault. After I check my program with gdb, a very strange
  20. message show as following:
  21.  
  22. Breakpoint 1, main () at fgngen.cc:20
  23. 20        Record myRecFile("./data/test.dat", STORE);
  24. (gdb) l
  25. 15      main()
  26. 16      {
  27. 17        int step;
  28. 18        double tmp, tmp1, tmp2;
  29. 19        
  30. 20        Record myRecFile("./data/test.dat", STORE);
  31. 21      
  32. 22        FGN fgnSeq = FGN(10, 700, 0.5);
  33. 23      
  34. 24      /*
  35. (gdb) s
  36. Record::Record (this=0xeffffb28, name=0x2290 "./data/test.dat",
  37. mytype=STORE)
  38.     at record.cc:5
  39. 5       {
  40. (gdb) s
  41. fstream::fstream (this=0xeffffb34, __in_chrg=1) at ./fstream.h:83
  42. ./fstream.h:83: No such file or directory.
  43. (gdb) 
  44.  
  45. From the message I guess the system should check the director
  46. /usr/local/lib/g++-include to refer fstream.h. Could anyone tell me
  47. what's wrong with it?
  48.  
  49. thanks in advance.
  50.